import java.io.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException
    {
        System.out.println("请输入年份:");
        InputStreamReader ir = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(ir); //为字符输入流添加缓冲功能
        String s = br.readLine();
        System.out.println(s);

        int year;
        Scanner sc = new Scanner(System.in);
        year = sc.nextInt();
        if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
        {
            System.out.println("year:" + year + " is a leap year");
        }
        else
        {
            System.out.println("year:" + year + " is not a leap year");
        }
        br.close();
        ir.close();
        sc.close();
    }

    public static void main2(String[] args) {
        System.out.println("hello world");
        System.out.println("\"hello world\"");
        System.out.println("\\\"hello world\"\\");
    }
}